using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class EmptyResolver<TModel> : IResolveEngine<TModel>.IResolver where TModel : class
{
  private IResolveEngine<TModel>.IHolder m_holder;

  public EmptyResolver() {
  }

  public EmptyResolver(IResolveEngine<TModel>.IHolder holder) {
    m_holder = holder;
  }

  public void Resolve(IResolveEngine<TModel>.ResolveContext context) {
    context.pushHolder(m_holder == null ? new EmptyHolder<TModel>() : m_holder);
  }

}

public class EmptyHolder<TModel> : IResolveEngine<TModel>.IHolder where TModel : class
{
  public void Hold(IResolveEngine<TModel>.ResolveContext context) {
  }

  public bool IsHolding() {
    return false;
  }

  public void Release() {
  }
}